package com.story.api.moduler.song.dao;


import com.story.api.common.persistence.model.Channel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
  *  Mapper 接口
 * </p>
 *
 * @author yangbo
 * @since 2019-08-05
 */
public interface UserChannelDao {

    /**
     * 通过channelId批量解除频道与用户的关系
     * @param channelIdList
     */
    void batchUnbindRelationByChannelId(@Param("channelIdList") List<Integer> channelIdList);

    /**
     * 得到用户收藏的频道
     * @param userId
     * @return
     */
    List<Channel> userChannelList(@Param("userId") Integer userId);

    /**
     * 绑定
     * @param userId
     * @param channelIdList
     */
    void bindUserChannel(@Param("userId") Integer userId,
                         @Param("channelIdList") List<Integer> channelIdList);
}